<template>
  <view class="price-wrap">
    <text class="pw__unit">{{ unit }}</text>
    <text class="pw__value">{{ value }}</text>
    <text v-if="sub" class="pw__sub">{{ sub }}</text>
  </view>
</template>

<script>
export default {
  name: 'PriceWrap',
  components: {},
  mixins: [],
  props: {
    unit: { type: String,default: '￥' },
    value: Number,
    sub: String
  },
  data () {
    return {}
  },
  methods: {
  }
}
</script>

<style lang="less">
.same-style() {
  display: inline-block;
  color: #ff0000;
  font-weight: bold;
}
.price-wrap{
  // 默认样式
  .pw__unit{
    .same-style();
    font-size: 26rpx;
  }
  .pw__value{
    .same-style();
    font-size: 48rpx;
  }
  .pw__sub{
    .same-style();
    margin-left: 20rpx;
    font-size: 26rpx;
  }
}
</style>